#ifndef _IMAGE_H_
#define _IMAGE_H_

#include "colour.h"

enum ImageError
{
  IMAGE_ERROR_OK,
  IMAGE_ERROR_NOT_OPEN_FILE,
  IMAGE_ERROR_WRONG_FORMAT
};

struct Image
{
  unsigned width;
  unsigned height;
  Colour* colour;
};

struct ImageAlpha
{
  unsigned width;
  unsigned height;
  uint8* alpha;
};

void Image_init(Image* image);
void Image_free(Image* image);

ImageError Image_load(Image* image, const char* filename);
ImageError Image_save(const Image& image, const char* filename);

#endif
